import request from '@/utils/request'

// 获取仓库类型下拉列表
export function getWarehouseTypeList() {
  return request({
    url: '/operation/web/operationWarehouseSetting/warehouseTypeList',
    method: 'get'
  })
}

// 查询仓库设置列表
export function getWarehouseList(params) {
  return request({
    url: '/operation/web/operationWarehouseSetting/list',
    method: 'get',
    params
  })
}

// 获取仓库设置详细信息
export function getWarehouseDetail(warehouseId) {
  return request({
    url: `/operation/web/operationWarehouseSetting/${warehouseId}`,
    method: 'get'
  })
}

// 新增仓库设置
export function addWarehouse(data) {
  return request({
    url: '/operation/web/operationWarehouseSetting',
    method: 'post',
    data
  })
}

// 修改仓库设置
export function updateWarehouse(data) {
  return request({
    url: '/operation/web/operationWarehouseSetting',
    method: 'put',
    data
  })
}

// 删除仓库设置
export function deleteWarehouse(warehouseIds) {
  return request({
    url: `/operation/web/operationWarehouseSetting/${warehouseIds}`,
    method: 'delete'
  })
}